1. Field of the Invention
This invention relates in general to peripheral device control systems, and relates more particularly to such systems having improved capabilities for modifying the firmware or microcode therein.
2. Prior Art
In many systems for the control of peripheral devices associated with computer systems there is a need to periodically modify or update the firmware in the control systems. Such need may arise during the development stage or during the commercial use stage, or both. Examples of computer peripheral device control systems which require such firmware modification are those associated with disk drives, tape drives, printers and modems. For instance, most current hard disk drive systems incorporate a single microcontroller and electrically programmable read only memory (EPROM) chips to provide the overall control hardware/firmware. This approach has been utilized from the early days of the hard disk drive and it has provided the lowest cost and most flexibility at the beginning of the design cycle. Firmware changes in hard disk drive systems are very common as a result of many factors. These factors include the fact that the hard disk drive is an electromechanical device; interface specifications change; more selftest functions are needed, and finally, human error occurs in the design process.
In that early period, when printed circuit board (PCB) space was not at a premium, the microcontroller chip and the EPROM were provided in what was known as Dual In-Line (DIP) packages. This approach not only provided the lowest cost, but also allowed the designer to use sockets on the PCB so that modifications to the firmware could be accomplished by replacing the EPROM without requiring any unsoldering or soldering.
The continuing evolution of hard disk drives has provided increasing memory capacities and an overall reduction in physical size. This has forced the designer to use Surface Mount Device (SMD) technology to provide the added functionality required to produce higher capacities with less PCB space. Most designers maintained the microcontroller/EPROM design architecture, but paid a high price for this architecture when firmware changes were required in the field. The cost difference between the two design approaches was on the average of 200% more for the SMD technology. This forced many disk drive system developers to commit to Read Only Memory (ROM) devices early in the design cycle to reduce costs. However, when a subsequent firmware change was required, greater costs were incurred. In the worst case, with the ROM soldered to the PCB, the ROM first had to be unsoldered from the PCB, the old ROM scrapped, and a new one soldered in its place.
Another problem encountered with some disk drive system designs is the location of the code memory chip itself. The memory chip may be buried inside the PCB, so that the PCB itself has to be removed before the memory chip can be accessed and changed, adding more cost to the firmware change process.
One approach to reduce the cost of firmware changes is to employ a single microcontroller, but add a small set of "BOOT" firmware which is mask fabricated into the microcontroller, and substitute a random access memory (RAM) chip in place of the EPROM. The masked BOOT code from the microcontroller is used to "spin up" the disk drive device and position the read/write heads over a special track on the disk that contains the remaining firmware which is then downloaded from the disk to the RAM. The BOOT firmware then turns control over to the RAM-based code.
When introduced, this technique was a breakthrough for cost vs firmware updates compared to the early EPROM technique. However, this approach still has disadvantages. For one, the designer needed to complete the BOOT code quickly in order to enable the microcontroller fabricator to complete the BOOT code masking process. Secondly, most of the disk drive hardware needed to be functioning in order to update the code on the disk. Thirdly, there is a long time delay involved in spinning up the disk and downloading the code, sometimes causing problem on fast systems at power on.
With the introduction of the flash memory chip in 1988, a solution for changeable firmware in disk drive systems was possible. Current flash memory chips fall into different types, 12 volt vs 5 volt reprogrammable, and bulk erase vs byte or page erasable. This type of memory device appeared to provide a good design approach to allow changeable firmware throughout the life of the disk drive. It would provide changeable firmware without the need to replace the chip, and no masked microcontroller BOOT firmware was needed. Other advantages over the RAM-based design was that very little hardware was needed in order to reprogram and no time delay was incurred on power up.
The use of flash memory in this environment did present two significant problems. The first was the cost of flash memory technology itself, and the second was the need to be able to reprogram the flash memory without any masked BOOT code. The cost issue involves consideration of the cost savings which can be obtained with the use of flash memory if firmware changes are needed. One approach would be to utilize two flash memory chips, one containing the BOOT code and the other containing the changeable firmware. However, this is not totally attractive because of the added space requirement for the second chip on an already crowded PCB. The present invention solves the second problem of changing firmware with only a single microcontroller and a single flash memory chip, without the use of any masked BOOT code.